# Maintainer: atom2013 <atom.long@hotmail.com>

pkgbase=python-appdirs
pkgname=(python-appdirs)
pkgver=1.4.4
pkgrel=1
pkgdesc='A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".'
arch=('any')
url="https://github.com/ActiveState/appdirs"
license=('MIT')
depends=('python')
makedepends=('python-setuptools')
provides=('python3-appdirs')
replaces=('python3-appdirs')
conflicts=('python3-appdirs')
source=("https://pypi.io/packages/source/a/appdirs/appdirs-${pkgver}.tar.gz")
sha256sums=('7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41')

build() {
  cd "$srcdir"/appdirs-$pkgver
  /usr/bin/python setup.py build
}

check() {
  cd "${srcdir}"/appdirs-${pkgver}
  /usr/bin/python setup.py test
}

package() {
  cd appdirs-${pkgver}

  /usr/bin/python setup.py install --root="${pkgdir}/" --optimize=1
  install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.txt
}
